package com.sailfish.springbootdemo.controller.db2;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db2.PcbConfig;
import com.sailfish.springbootdemo.pojo.db2.PcbParentFactoryInfo;
import com.sailfish.springbootdemo.service.db2.PcbConfigService;
import com.sailfish.springbootdemo.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/pcbConfig")
public class PcbConfigController {

    @Autowired
    PcbConfigService pcbConfigService;

    @PostMapping("/getAll")
    public Result getAll(String attrName) {
        List<PcbConfig> list = pcbConfigService.getAll(attrName, null, null, null);
        return ResultUtil.success(list);
    }
}
